package views.pop
{
	import flash.events.Event;
	import flash.events.FocusEvent;
	import flash.geom.Point;
	
	import module.ProjectEventModule;
	import module.ProjectModule;
	import module.ProjectModuleBase;
	
	import mx.events.AIREvent;
	import mx.events.FlexEvent;
	
	import spark.components.Panel;
	import spark.components.Window;
	
	public class PopEventViewBase extends Window implements IPopViews
	{
		private var m_data:*;
		public function PopEventViewBase()
		{
			super();
			this.addEventListener(FlexEvent.CREATION_COMPLETE, handleInit, false, 0, true);
			this.addEventListener( AIREvent.WINDOW_DEACTIVATE, handleFocusOut, false, 0, true);
		}
		public function show($callPoint:Point):void
		{
			this.open(true);
		}
		public function hide():void
		{
			
		}
		public function get data():*
		{
			return m_data;	
		}
		public function set data($data:*):void
		{
			m_data = $data;
			if ($data is ProjectEventModule)
			{
				
			}
		}
		
		/**
		 * events
		 * 
		 * 
		 */
		protected function handleInit($event:FlexEvent):void
		{
			if (m_data is ProjectEventModule)
			{
				var tmpData:ProjectEventModule = m_data as ProjectEventModule;
				this.title = tmpData.title;
				
				
			}
		}
		protected function handleFocusOut($event:AIREvent):void
		{
			this.close();
		}
	}
}